﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Import_cpdb_delete : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSModel.CMSEntities dal = DAL.DBManager.GetCmsEmtity();
        string typeId = Request["LocalTypeId"];
        string cpTypeId = Request["CpTypeId"];
        dal.CPTypeMatching.DeleteObject(dal.CPTypeMatching.First(x => x.LocalTypeId == typeId && x.CpTypeId == cpTypeId));
        dal.SaveChanges();
        ClientScript.RegisterStartupScript(GetType(), "delete", "alert('删除成功');document.location='News.aspx'", true);
    }
}